package testing;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.Vector;

import misc.Processing;

import database.DbAccess;
import database.SelectOptions;
import database.SelectOptionsData;
import options.BlackScholesFormula;
import options.BlackScholes_1973;
import options.Black_76;

public class Valuation_main {

/**
 * Application intended to check the option valuation using Black and Black-Scholes 
 * The model was first articulated by Fischer Black and Myron Scholes in their 1973 paper, 
 * "The Pricing of Options and Corporate Liabilities", published in the Journal of Political Economy.
 * 
 * @author mblackford mBret Bret Blackford (2013)
 * @param args [User should pass in Db ID (for PRODACI1) and password]
 */
	public static void main(String[] args) {

		String password = "";
		String id = "";
		if (args.length > 0) {
			try {
				id = args[0];
				password = args[1];
			} catch (Exception e) {
				System.out.println("Problem with the arguments.");
				e.printStackTrace();
			}
			System.out.println("id=[" + id + "] password=[" + password + "]");
		}

		Processing process = new Processing();
		process.getData(id, password);
		process.runOptionValuations();
		process.printResultsToFile();

	}

}
